export function getBetweenDateStr(starDay: any, endDay: any) {
    let arr = [];
    let dates = [];

    // 设置两个日期UTC时间
    let db = new Date(starDay);
    let de = new Date(endDay);

    // 获取两个日期GTM时间
    let s = db.getTime() - 24 * 60 * 60 * 1000;
    let d = de.getTime() - 24 * 60 * 60 * 1000;

    // 获取到两个日期之间的每一天的毫秒数
    for (let i = s; i <= d;) {
        i = i + 24 * 60 * 60 * 1000;
        arr.push(parseInt(i.toString()))
    }

    // 获取每一天的时间  YY-MM-DD
    for (let j in arr) {
        let time = new Date(arr[j]);
        let mouth = (time.getMonth() + 1) >= 10 ? (time.getMonth() + 1) : ('0' + (time.getMonth() + 1));
        let day = time.getDate() >= 10 ? time.getDate() : ('0' + time.getDate());
        let YYMMDD = mouth + '月' + '-' + day + '日';
        dates.push(YYMMDD)
    }

    return dates

    // let startDate = Date.parse(start);
    // let endDate = Date.parse(end);
    // if (startDate > endDate) {
    //     return false;
    // } else if (startDate == endDate) {
    //     start = start.split('')
    //     start[4] = '年'
    //     start[7] = '月'
    //     start[10] = '日'
    //     start = start.join('')
    //     return [start]
    // }
    // let result = [];
    // let beginDay = start.split("-");
    // let endDay = end.split("-");
    // let diffDay = new Date();
    // let dateList = new Array;
    // let i = 0;
    // console.log();

    // diffDay.setDate(beginDay[2]);
    // diffDay.setMonth(beginDay[1] - 1);
    // diffDay.setFullYear(beginDay[0]);
    // start = start.split('')
    // start[4] = '年'
    // start[7] = '月'
    // start[10] = '日'
    // start = start.splice(5).join('');
    // console.log(start);

    // result.push(start);
    // while (i == 0) {
    //     let countDay = diffDay.getTime() + 24 * 60 * 60 * 1000;
    //     diffDay.setTime(countDay);
    //     dateList[2] = diffDay.getDate();
    //     dateList[1] = diffDay.getMonth() + 1;
    //     dateList[0] = diffDay.getFullYear();
    //     if (String(dateList[1]).length == 1) {
    //         dateList[1] = "0" + dateList[1]
    //     }
    //     if (String(dateList[2]).length == 1) {
    //         dateList[2] = "0" + dateList[2]
    //     }
    //     result.push(dateList[1] + "月" + dateList[2] + "日");
    //     if (dateList[0] == endDay[0] && dateList[1] == endDay[1] && dateList[2] == endDay[2]) {
    //         i = 1;
    //     }
    // }
    // return result;
}